package it.softphone.cmc.server.security;


import it.softphone.commons.service.security.SecurityAccountService;
import it.softphone.commons.spring.ApplicationConfig;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.apache.shiro.web.filter.PathMatchingFilter;

/**
 * 
 * @author bsorrentino
 *
 */
public class CMCDevelopmentFilter extends PathMatchingFilter {

	public CMCDevelopmentFilter() {
	}

	@Override
	protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
		
		SecurityAccountService service = ApplicationConfig.getBean(SecurityAccountService.class);
		
		service.login( "acasolla", "password", false);
		
		return true;
	}

}
